package com.sense.kukoo.common.wiget;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.alibaba.android.arouter.launcher.ARouter;
import com.sense.kukoo.common.R;
import com.sense.kukoo.common.constant.ARouterUrl;

public class EditorPicksView extends FrameLayout {

    public EditorPicksView(@NonNull Context context) {
        super(context);
        initView();
    }

    public EditorPicksView(@NonNull Context context, @Nullable AttributeSet attrs) {
        super(context, attrs);
        initView();
    }

    public EditorPicksView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        initView();
    }

    public EditorPicksView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        initView();
    }

    private void initView() {
        LayoutInflater.from(getContext()).inflate(R.layout.common_editor_picks_1, this, true);

        View tv_see_all = findViewById(R.id.tv_see_all);
        tv_see_all.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance()
                        .build(ARouterUrl.ROUTE_EXPLORE_MODULE_MUSIC_COLLECTION_ACTIVITY)
                        .navigation();
            }
        });
    }
}
